package com.leosoft.heatmonitor.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "meter", catalog = "heatMonitor")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Meter implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5022995981925966842L;
	private String id;
	private String name;
	private String status;
	private Double allflow;
	private Double allheat;
	private Double lastheat;
	private Double currentflow;
	private Double inTemperature;
	private Double outTemperature;
	private String deviceKey;
	private String addr1;

	@GenericGenerator(name = "generator", strategy = "uuid")
	@GeneratedValue(generator = "generator")
	@Id
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "status", nullable = false, length = 10)
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "allflow", nullable = false)
	public Double getAllflow() {
		return allflow;
	}

	public void setAllflow(Double allflow) {
		this.allflow = allflow;
	}

	@Column(name = "allheat", nullable = false)
	public Double getAllheat() {
		return allheat;
	}

	public void setAllheat(Double allheat) {
		this.allheat = allheat;
	}

	@Column(name = "lastheat", nullable = false)
	public Double getLastheat() {
		return lastheat;
	}

	public void setLastheat(Double lastheat) {
		this.lastheat = lastheat;
	}

	@Column(name = "currentflow", nullable = false)
	public Double getCurrentflow() {
		return currentflow;
	}

	public void setCurrentflow(Double currentflow) {
		this.currentflow = currentflow;
	}

	@Column(name = "inTemperature", nullable = false)
	public Double getInTemperature() {
		return inTemperature;
	}

	public void setInTemperature(Double inTemperature) {
		this.inTemperature = inTemperature;
	}

	@Column(name = "outTemperature", nullable = false)
	public Double getOutTemperature() {
		return outTemperature;
	}

	public void setOutTemperature(Double outTemperature) {
		this.outTemperature = outTemperature;
	}

	public String getDeviceKey() {
		return deviceKey;
	}

	public void setDeviceKey(String deviceKey) {
		this.deviceKey = deviceKey;
	}

	@Column(name = "addr1", nullable = false, length = 20)
	public String getAddr1() {
		return addr1;
	}

	public void setAddr1(String addr1) {
		this.addr1 = addr1;
	}

	@Column(name = "name", nullable = false, length = 20)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
